package top.wardyan.wbaseswt.control;

import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Composite;

import top.wardyan.wbaseswt.conf.Const;

public class WStatusCombo extends WCombo{

	public WStatusCombo(Composite parent, int style) {
		super(parent, style);
		this.createContent();
	}
	
	public WStatusCombo(Composite parent, int x, int y, int width, int height, Font font) {
		super(parent, x, y,width, height, font);
		this.createContent();
	}
	
	
	
	private void createContent() {
		this.setFont(Const.getDefaultFont());
		this.setBackground(Const.COLOR_WHITE);
		this.setForeground(Const.COLOR_BLACK);
		this.add("1草稿");
		this.add("2编辑");
		this.add("3提交");
		this.add("4复核");
		this.add("5审核");
		this.add("6锁定");
		
		this.select(1);
		//this.setEnabled(false);
		this.setEditable(false);
	}
	
	/**
	 * 取得控件右下角的定点的x
	 * @return
	 */
	public int getVertexX() {
		return this.getLocation().x + this.getSize().x;
	}
	/**
	 * 取得控件右下角的定点的y
	 * @return
	 */
	public int getVertexY() {
		return this.getLocation().y + this.getSize().y;
	}

	@Override
	protected void checkSubclass() {}

}

